package com.yb.auth.core.bean;

import com.yb.auth.core.constant.LoginConstant;
import org.springframework.security.core.GrantedAuthority;

import java.util.Collection;

/**
 * Copyright (C), 2022-2022, 姚兵
 * Author: 32210
 * Date: 2022/11/13 18:29
 * FileName: SysUserToken
 * Description:
 */
public class SysUserPassAuthentication extends AbstractAuthentication {

    private String verifyCode;

    private String imgUUID;

    {
        this.setLoginType(LoginConstant.LoginType.USER_PASS.getType());
    }
    public SysUserPassAuthentication(SysUser sysUser){
        super(sysUser);
    }

    public SysUserPassAuthentication(String username, String password){
        super(username,password);
    }
    public SysUserPassAuthentication(SysUser sysUser, Collection<? extends GrantedAuthority> authorities){
        super(sysUser,authorities);
    }



    public static SysUserPassAuthentication authenticated(SysUser sysUser, Collection<? extends GrantedAuthority> authorities) {
        return new SysUserPassAuthentication(sysUser, authorities);
    }


    public void setSysUser(SysUser sysUser) {
        super.setSysUser(sysUser);
    }

    public SysUser getSysUser() {
        return super.getSysUser();
    }

    public String getVerifyCode() {
        return verifyCode;
    }

    public void setVerifyCode(String verifyCode) {
        this.verifyCode = verifyCode;
    }


    public void setImgUUID(String imgUUID) {
        this.imgUUID = imgUUID;
    }

    public String getImgUUID() {
        return imgUUID;
    }

    @Override
    public String toString() {
        return super.toString();
    }
}
